package function

class CaseClass {

}
//定义样例类做样例匹配
case class Students(name:String,age:Int)
object CaseClass{
  def main(args: Array[String]): Unit = {
    val student = new Students("alice", 18)
    val str: String = student match {
      case Students("alice", 18) => "alice,18"
      case _ => "other"

    }
    println(str)

  }
}
